package com.hung.pojo;

import java.util.Objects;

/**
 * 吃瓜群众类
 * @author Hung
 */
public class User {
    /**
     * 用户id，其他地方称uid
     */
    private Integer id;
    /**
     * 昵称
     */
    private String nickName;
    /**
     * 性别
     */
    private String gender;
    /**
     * 生日
     */
    private String birthday;
    /**
     * 描述
     */
    private String desc;

    public User() {
    }

    public User(Integer id, String nickName, String gender, String birthday, String desc) {
        this.id = id;
        this.nickName = nickName;
        this.gender = gender;
        this.birthday = birthday;
        this.desc = desc;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", nickName='" + nickName + '\'' +
                ", gender='" + gender + '\'' +
                ", birthday='" + birthday + '\'' +
                ", desc='" + desc + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        User user = (User) o;
        return Objects.equals(id, user.id) && Objects.equals(nickName, user.nickName) && Objects.equals(gender, user.gender) && Objects.equals(birthday, user.birthday) && Objects.equals(desc, user.desc);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, nickName, gender, birthday, desc);
    }
}
